import config, { NODE_SETING_ENUM } from '../../config'

export default {
  shape: 'polygon',
  width: 80,
  height: 6,
  points: '0,0 80,0',
  attrs: {
    body: {
      stroke: config.nodeStroke,
      strokeWidth: 6,
      fill: '#ffffff',
      strokeDasharray: 5
    },
    data: {
      width: config.nodeWidth
    },
    line: {
      strokeWidth: 4,
      stroke: '#ffffff',
      fill: '#ffffff'
    }
  },
  markup: [
    {
      tagName: 'polygon',
      selector: 'body'
    },
    {
      tagName: 'g',
      selector: 'group',
      children: [
        {
          tagName: 'polygon',
          selector: 'line1',
          groupSelector: 'line',
          attrs: {
            x: 0,
            y: 1,
            width: '100%',
            height: 4,
            points: '-1,0 81,0'
          }
        }
      ]
    }
  ],
  data: {
    options: {
      [NODE_SETING_ENUM.WIDTH]: { max: 500 },
      [NODE_SETING_ENUM.ANGLE]: true,
      [NODE_SETING_ENUM.STROKE]: true,
      [NODE_SETING_ENUM.LINE_TYPE]: { type: 2 }
    }
  }
}
